home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / ARC / ARCS.MAC < prev    next >
Text File  |  1986-01-07  |  2KB  |  50 lines

  1. /*  ARC - Archive utility - Archive file header format
  2.  
  3. $define(tag,$$segment(@1,$$index(@1,=)+1))#
  4. $define(version,Version $tag(
  5. TED_VERSION DB =2.13), created on $tag(
  6. TED_DATE DB =01/07/86) at $tag(
  7. TED_TIME DB =17:17:32))#
  8. $undefine(tag)#
  9.     $version
  10.  
  11. (C) COPYRIGHT 1985 by System Enhancement Associates; ALL RIGHTS RESERVED
  12.  
  13.     By:  Thom Henderson
  14.  
  15.     Description:
  16.          This file defines the format of an archive file header, excluding
  17.          the archive marker and the header version number.
  18.  
  19.          Each entry in an archive begins with a one byte archive marker,
  20.          which is set to $arcmark.  The marker is followed by a one byte
  21.          header type code, from zero to $arcver.
  22.  
  23.          If the header type code is zero, then it is an end marker, and
  24.          no more data should be read from the archive.
  25.  
  26.          If the header type code is in the range 2 to $arcver, then it is
  27.          followed by a standard archive header, which is defined below.
  28.  
  29.          If the header type code is one, then it is followed by an older
  30.          format archive header.  The older format header does not contain
  31.          the true length.  A header should be read for a length of
  32.          sizeof(struct heads)-sizeof(long).  Then set length equal to size
  33.          and change the header version to 2.
  34.  
  35.     Programming note:
  36.          The crc value given in the header is based on the unpacked data.
  37.  
  38.     Language:
  39.          Computer Innovations Optimizing C86
  40. */
  41.  
  42. struct heads                           /* archive entry header format */
  43. {   char name[$fnlen];                 /* file name */
  44.     long size;                         /* size of file, in bytes */
  45.     unsigned int date;                 /* creation date */
  46.     unsigned int time;                 /* creation time */
  47.     int crc;                           /* cyclic redundancy check */
  48.     long length;                       /* true file length */
  49. }   ;
  50.